import request from '@/utils/request'

// 创建仓储入库
export function createOrderPut(data) {
  return request({
    url: '/storage/order-put/create',
    method: 'post',
    data: data
  })
}

// 更新仓储入库
export function updateOrderPut(data) {
  return request({
    url: '/storage/order-put/update',
    method: 'put',
    data: data
  })
}

// 删除仓储入库
export function deleteOrderPut(id) {
  return request({
    url: '/storage/order-put/delete?id=' + id,
    method: 'delete'
  })
}

/** 批量删除仓储入库 */
export function deleteOrderPutList(ids) {
  return request({
    url: `/storage/order-put/delete-list?ids=${ids.join(',')}`,
    method: 'delete'
  })
}

// 获得仓储入库
export function getOrderPut(id) {
  return request({
    url: '/storage/order-put/get?id=' + id,
    method: 'get'
  })
}

// 获得仓储入库分页
export function getOrderPutPage(params) {
  return request({
    url: '/storage/order-put/page',
    method: 'get',
    params
  })
}
// 导出仓储入库 Excel
export function exportOrderPutExcel(params) {
  return request({
    url: '/storage/order-put/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}